package org.grow.rose.domain;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.swing.*;
import java.awt.*;

@Component
public class MainFrame extends JFrame {
    @Autowired
    private GiftButton giftButton;
    @Autowired
    private Console console;
    @Autowired
    private LightButton lightButton;

    @Value("${sign}")
    private String title;
    @PostConstruct
    public void initSpring(){
        this.setTitle(title);
        this.setSize(500,600);
        this.setLayout(new FlowLayout());
        this.add(giftButton);
        this.add(console);
        this.add(lightButton);


        this.setVisible(true);
    }
//        this.setTitle("gift");
//        this.setSize(600, 300);
//        this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
//
//
//        this.setLayout(new FlowLayout());
//
//        GiftButton role = new GiftButton();
//        this.add(role);
//
//
//
//        this.setVisible(true);

}
